<!DOCTYPE html>
<html lang="zh-CN" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约</title>
    <link rel="stylesheet" href="../css/page-health-order.css"/>
    <link rel="stylesheet" href="../plugins/elementui/index.css"/>

</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="date">
            <label>开始时间</label>
            <i class="icon-date" class="startTime"></i>
            <input v-model="startTime" type="date" class="startTime">
        </div>
        <div class="date">
            <label>结束时间</label>
            <i class="icon-date" class="endTime"></i>
            <input v-model="endTime" type="date" class="endTime">
        </div>

        <input style="font-size: x-small;" @click="findByPage()" type="button" value="查询">
        <br/>
    </div>

    <div class="contentBox">
        <div class="list-column1">
            <ul class="list">
                <li class="list-item" v-for="setmeal in setmealList">
                    <!--<a href="javascript:void(0);" onclick="GoToNext()"></a>-->
                    <a id="s_order" class="link-page"  :href="'order_detail.html?id='+setmeal.s_id+'&orderName='+setmeal.orderName+'&orderDate='+setmeal.orderDate"  >
                        <img class="img-object f-left" :src="'http://qgc6wtosq.hd-bkt.clouddn.com/'+setmeal.img"  style="height: 100px;width: 100px" />
                        <div class="item-body">
                            <h4 class="ellipsis item-title">体检人 : {{setmeal.orderName}}</h4>
                            <h4 class="ellipsis item-title">体检套餐 : {{setmeal.setmealName}}</h4>
                            <h4 class="">点击查看预约详情</h4>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<script src="../plugins/elementui/index.js"></script>
<!--<script src="../js/page-health-order.js"></script>-->
<script>

 /*   var href=$("#s_order").attr('href');
    $("#s_order").attr('href',href+this

*/

    var vue = new Vue({
        el: '#app',
        data: {
            setmealList: [],
            startTime: "",
            endTime: "",

        },
        methods: {
            findByPage() {
                axios.get("/member/findOrderRecord.do?startTime="+this.startTime+"&endTime="+this.endTime).then(resp=>{
                    if (!resp.data.flag) {
                        this.$message.error(resp.data.message);
                        return;
                    }
                    this.setmealList = resp.data.data;

                })
            },
        }
    });
</script>
<script>
    //日期控件
    var startTime = new datePicker();
    startTime.init({
        'trigger': '.startTime',/*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        maxDate: getSpecifiedDate(new Date(),365),/*最大日期*/
    });

    var endTime = new datePicker();
    endTime.init({
        'trigger': '.endTime',/*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        maxDate:getSpecifiedDate(new Date(),365)
    });
</script>

</body>
</html>